
<form id="form" action="{:url('ecard/index')}">
    <input type="hidden" name="id" value="{$info.id}"/>
    <input type="hidden" name="picture" value="{$info.picture}" id="picture" />
    <table class="formtable">
        <tr><th>商户名称:</th><td><input class="input {if $info}readonly{/if}" datatype="*" type="text" name="brand_name" value="{$info.brand_name}"/><span class="red">
            {if $card && $card.card.member_card.base_info.status == 'CARD_STATUS_NOT_VERIFY'}待审核{/if}
            {if $card && $card.card.member_card.base_info.status == 'CARD_STATUS_VERIFY_FAIL'}审核失败{/if}
            {if $card && $card.card.member_card.base_info.status == 'CARD_STATUS_VERIFY_OK'}通过审核{/if}
            {if $card && $card.card.member_card.base_info.status == 'CARD_STATUS_DELETE'}卡券被商户删除{/if}
            {if $card && $card.card.member_card.base_info.status == 'CARD_STATUS_DISPATCH'}已投放{/if}
        </span></td></tr>
        <tr><th>小程序ID:</th><td><input class="input" datatype="*" type="text" name="gh_id" value="{$info.gh_id}"/></td></tr>
        <tr><th>卡券名称:</th><td><input class="input" datatype="*" type="text" name="title" value="{$info.title}" /></td></tr>
        <tr><th>使用提醒:</th><td><input class="input" datatype="*" type="text" name="notice" value="{$info.notice}" /></td></tr>
        <tr><th>使用说明:</th><td><input class="input" datatype="*" type="text" name="description" value="{$info.description}" /></td></tr>
        <tr><th>库存数量:</th><td><input class="input" datatype="n" type="text" name="quantity" value="{$info.quantity}"/><span class="red"> {if !empty($card)}剩余{$card.card.member_card.base_info.sku.quantity}{/if}</span></td></tr>
        <tr><th>券颜色:</th><td><input class="input" datatype="*" type="text" name="color" value="{$info.color}" /><span class="gray">1、Color010-Color100</span></td></tr>
        <tr><th>年费:</th><td><input class="input" datatype="*" type="text" name="annual_fee" value="{$info.annual_fee}" /></td></tr>
        <tr><th>有效期:</th><td>
            <input class="input ui-date" type="text" name="start_time" value="{$info.start_time?$info.start_time|date='Y-m-d':''}" />
            <input class="input ui-date" type="text" name="end_time" value="{$info.end_time?$info.end_time|date='Y-m-d':''}" />  <span class="gray">1、空是长期有效2、只支持往后延长时间</span></td></tr>
        <tr><th>特权说明</th><td><textarea class="textarea w500 h150" name="prerogative">{$info.prerogative}</textarea></td></tr>
        <tr><th>图片样式</th><td><div  url="{:url('system/passport.common/upload')}" class="img-review fn-cp">{if $info.picture}<img src="{$info.picture}">{else /}<img src="__PUBLIC__/admin/review.png">{/if}</div></td></tr>
        <tr>
            <th></th>
            <td>
                <input type="submit" value="确定" class="button button-blue submit" />
<!--                <input type="button" value="删除" class="button button-red" url="{:url('ecard/delete',['id'=>$info.id])}"/>-->
                <a href="{:url('ecard/storeindex',['id'=>$info.id])}"><input type="button" value="管理" class="button button-green"/></a>
            </td>
        </tr>
    </table>
    </div>
</form>
<script type="text/javascript">
    Do('base','layer','form','date',function(){
        $('#form').isForm();
        $(".img-review").win();
        $(".button-red").isDel();
    })
    //添加图片
    function setImg(show_src){
        $("#picture").val(show_src);
        $(".img-review").html('<img src="'+show_src+'">');
    }
</script>